home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Atari Mega Archive 1
/
Atari Mega Archive - Volume 1.iso
/
program
/
funnel.zoo
/
sources
/
texhead.ctx
< prev
next >
Wrap
Text File
|
1993-04-11
|
16KB
|
321 lines
WX("%===================== Start of FunnelWeb TeX Definitions ======================");
WX("");
WX("");
WX("% Version");
WX("% -------");
WX("% This is FunnelWeb TeX Macro Library Version 1.0.");
WX("");
WX("");
WX("% Copyright");
WX("% ---------");
WX("% This set of FunnelWeb TeX definitions was written by Ross Williams and was");
WX("% originally Copyright (C) 1992 Ross N. Williams. However, I, Ross Williams,");
WX("% hereby forego any claim to Copyright in this set of FunnelWeb TeX definitions");
WX("% and hereby authorize that the set of TeX definitions pass into the public");
WX("% domain. -- Ross N. Williams, 3:41pm 07-May-1992, Adelaide, Australia.");
WX("");
WX("");
WX("% Modification");
WX("% ------------");
WX("% Please record all modifications to these TeX definitions here. Unless");
WX("% otherwise specified, all modified definitions fall in the public domain too.");
WX("%");
WX("% Programmers:");
WX("% RNW Ross N. Williams ross@spam.adelaide.edu.au");
WX("%");
WX("% Changes:");
WX("% 07-May-1992 RNW Prepared this work for public domain release.");
WX("%");
WX("");
WX("");
WX("% General Comments");
WX("% ----------------");
WX("% This set of TeX definitions exists for two reasons:");
WX("%");
WX("% 1. To shorten and neaten the FunnelWeb TeX output.");
WX("% 2. To allow users to fiddle with the output format in their input files");
WX("% (by inserting redefining \"\\def\"s) without having to resort to");
WX("% modifying the FunnelWeb code.");
WX("%");
WX("% The user is warned that these definitions may be changed from time to time");
WX("% (but probably not much). The user should not be too sneaky. In particular,");
WX("% users wishing to redefine some of these macros should do so in an explicitly");
WX("% defined section at the top of their input file. This will mean that in the");
WX("% event of problems, that section can simply be deleted or commented out to");
WX("% allow the document to at least be typeset in the default format. Users should");
WX("% limit themselves to redefining these macros in such a section and should");
WX("% refrain from using the macros throughout their documents.");
WX("");
WX("");
WX("% Environment Parameters");
WX("% ----------------------");
WX("% \\tolerance tells TeX how tolerant it should be about making bad line and");
WX("% page breaks. Here we set it to it's maximum, as");
WX("% 1) Computer programs are likely to cause lots of bad breaks.");
WX("% 2) In most cases the user would probably rather get the TeX file through");
WX("% TeX without any errors than fiddle with spacings for perfection.");
WX("\\tolerance=10000");
WX("");
WX("% I don't like indentation as it makes the page look more busy. Instead,");
WX("% paragraphs are separated by a little space (see next).");
WX("\\parindent=0pt");
WX("");
WX("% In many cases, users will produce documents with long runs of paragraphs.");
WX("% In order to space out these paragraphs, it is convenient to maintain a");
WX("% prevailing non-zero \\parskip (end-of-paragaph skip). The only trouble is");
WX("% that the skip becomes a problem in macro definitions which require no skip");
WX("% and so we have to turn the skip on and off. The following two macros");
WX("% simplify this process.");
WX("\\def\\fwparskipon{\\parskip=\\medskipamount}");
WX("\\def\\fwparskipoff{\\parskip=0pt}");
WX("\\fwparskipon");
WX("");
WX("% Setting raggedbottom allows TeX to leave a bit of space at the bottom of the");
WX("% page in order to better vertically align the rest of the page (e.g. skips");
WX("% won't stretch as much). It also means that headings are less likely to be");
WX("% isolated at the bottom of the page without any following text.");
WX("\\raggedbottom");
WX("");
WX("");
WX("% Fonts");
WX("% -----");
WX("% Most of the typeset output is set in 10pt roman and 10pt tt font.");
WX("% The major extra font needs spring from titles and headings.");
WX("% For portability's sake we use only the following fonts:");
WX("% cmr10");
WX("% cmbx10");
WX("% cmtt10");
WX("% and some enlargements of them. These fonts are all \"standard\" fonts");
WX("% in Plain TeX. See The TeXbook p.350.");
WX("\\font\\fwfontnote=cmr7");
WX("");
WX("\\font\\fwfontnorm=cmr10");
WX("\\font\\fwfontnorma=cmr10 scaled \\magstep1");
WX("\\font\\fwfontnormb=cmr10 scaled \\magstep2");
WX("");
WX("\\font\\fwfontbold=cmbx10");
WX("\\font\\fwfontbolda=cmbx10 scaled \\magstep1");
WX("\\font\\fwfontboldb=cmbx10 scaled \\magstep2");
WX("\\font\\fwfontboldc=cmbx10 scaled \\magstep3");
WX("\\font\\fwfontboldd=cmbx10 scaled \\magstep4");
WX("");
WX("");
WX("% Macros for Stylistic Details");
WX("% ----------------------------");
WX("% This section contains all the fiddly little macros for setting the details");
WX("% of each macro definition.");
WX("");
WX("% Macro definitions are sandwiched by calls to these macros which can be used");
WX("% to sort out the spacing before and after the macro definition.");
WX("\\def\\fwbeginmacro{\\fwparskipoff\\bigskip}");
WX("\\def\\fwendmacro{\\fwparskipon\\par}");
WX("");
WX("% These macros deal with the macro name and definition line.");
WX("\\def\\fwmacroname#1#2{{\\sl #1\\/}$\\lbrack$#2$\\rbrack$}");
WX("\\def\\fwfilename#1#2{{\\bf #1}$\\lbrack$#2$\\rbrack$}");
WX("\\def\\fwzero#1{{\\bf Z}}");
WX("\\def\\fwmany#1{{\\bf M}}");
WX("\\def\\fwequals{ $\\equiv$}");
WX("\\def\\fwplusequals{ $+\\equiv$}");
WX("");
WX("% Now for the actual body of the definition. It looks nice to have the tt");
WX("% code indented a little. Again, we use macros instead of writing direct TeX,");
WX("% so as to allow the user to fiddle this stuff to taste without having to");
WX("% modify the FunnelWeb C code.");
WX("\\def\\fwodef{\\parindent=15pt\\vskip0pt$\\lbrace$\\parindent=20pt}");
WX("\\def\\fwcdef{$\\rbrace$\\vskip0pt\\parindent=0pt}");
WX("\\def\\fwoquote{`}");
WX("\\def\\fwcquote{'}");
WX("\\def\\fwoparen{$($}");
WX("\\def\\fwcomma{$,$}");
WX("\\def\\fwcparen{$)$}");
WX("\\def\\fwparam#1{$\\diamond #1$}");
WX("\\def\\fwparams#1{$(\\diamond #1)$}");
WX("");
WX("% These macros deal with the notes that are appended at the end of each");
WX("% macro definition. Note that even though \\fwisafile,\\fwusedin, and \\fwseealso");
WX("% have the same definition, they are given different names so as to allow the");
WX("% user to redefine these macros to typeset each kind of information differently");
WX("% if desired.");
WX("\\def\\fwbeginmacronotes{\\begingroup\\baselineskip=9pt\\smallskip}");
WX("\\def\\fwnote#1{{\\fwfontnote #1}\\par}");
WX("\\def\\fwisafile#1{\\fwnote{#1}}");
WX("\\def\\fwusedin#1{\\fwnote{#1}}");
WX("\\def\\fwseealso#1{\\fwnote{#1}}");
WX("\\def\\fwendmacronotes{\\endgroup}");
WX("");
WX("");
WX("% Macros to Typeset Program Code Verbatim");
WX("% ---------------------------------------");
WX("% This is by far the hairiest and most difficult part of the typesetting task");
WX("% because we have to turn off most of TeX's natural instincts in order to");
WX("% typeset the program text exactly as it appears in the input file.");
WX("% Two macros are defined to pull this off: \\fwbtx and \\fwverbatimgobble.");
WX("% Their code was inspired by the following sections of \"The TeXbook\":");
WX("% Appendix D: Dirty Tricks, 3.Verbatim listing, p.380-382.");
WX("% Appendix E: Example Formats, p.421.");
WX("% The \\fwbtx[ (for \"FunnelWeb Begin TeXt\") macro does most of the hard work.");
WX("% The liberal use of \"%\" is because I don't understand TeX well enough to");
WX("% understand when an end of line will cause trouble, and I am playing it safe.");
WX("");
WX("% Before defining the main \\fwbtx macro, we have to stash away some definitions");
WX("% in the hidden part of TeX's environment. Let's hope that these \"hidden\"");
WX("% definitions don't affect anything except what is desired to be affected.");